package it.eng.area118.mdocommon.android.rest;

import it.eng.area118.mdocommon.Callback;

import java.io.IOException;

import org.springframework.http.client.ClientHttpResponse;
import org.springframework.web.client.ResponseErrorHandler;

import android.util.Log;

public class AndroidResponseErrorHandler implements ResponseErrorHandler {

	public final static String TAG = "AndroidResponseErrorHandler";

	protected Callback callback;

	public AndroidResponseErrorHandler(Callback callback) {
		this.callback = callback;
	}

	public AndroidResponseErrorHandler() {
	}

	@Override
	public void handleError(ClientHttpResponse response) throws IOException {
		Log.e(TAG, "handleError: " + response.getStatusCode());

	}

	@Override
	public boolean hasError(ClientHttpResponse response) throws IOException {
		Log.e(TAG, "hasError: " + response.getStatusCode());
		return false;

	}

}
